import request from "@/utils/request";
// post
export const addUserApi = (data: any) => {
  return request({
    url: "/asset/project/add",
    method: "post",
    data: data,
  });
};
// get
export const getUserApi = (params: any) => {
  return request({
    url: "/buyer/economic/assessment/plan/info",
    method: "get",
    params: params,
  });
};

// 文件上传
export const fileUpload = (data: any) => {
  return request({
    url: "/file/upload",
    method: "post",
    data: data,
    headers: {
      "Content-Type": "multipart/form-data",
    },
  });
};
// 获取二进制流
export const previewFile = (params: any) => {
  return request({
    url: `/file/previewFile/${params.fileName}`,
    method: "get",
    responseType: "blob",
  });
};
